from django import forms
from real_estate.models import BaseProperty

__author__ = 'leroy'

class PropertyForm(forms.Form):
    PRICE_LEVEL = ((0, '-----------'),(200000,'$200,000'), (300000,'$300,000'), (400000,'$400,000'),
                       (500000,'$500,000'), (600000,'$600,000'), (700000,'$700,000'),
                       (800000,'$800,000'), (900000,'$900,000'), (1000000,'$1,000,000'),
                       (99000000, 'Maximum'))
    LAND_SIZE   = ((0, '-----------'), (200, '200 m2'), (300, '300 m2'), (400,'400 m2'), (500,'500 m2'),
                       (600,'600 m2'), (700,'700 m2'), (800,'800 m2'),(900,'900 m2'),(1000,'1000 m2'),(9999,'Maximum'),)

    property_type = forms.MultipleChoiceField(choices=BaseProperty.PROPERTY_TYPE, widget=forms.CheckboxSelectMultiple(), required=False)
#    suburb         = forms.ModelChoiceField(widget=forms.Select ,required=False, queryset=Suburb.objects.all())
#    street         = forms.ModelChoiceField(widget=forms.Select, required=False, queryset=Street.objects.all())
    bedrooms       = forms.MultipleChoiceField(choices=BaseProperty.BEDROOMS, widget=forms.CheckboxSelectMultiple(), required=False)
    bathrooms      = forms.MultipleChoiceField(choices=BaseProperty.BATHROOMS, widget=forms.CheckboxSelectMultiple(), required=False)
    car_space      = forms.MultipleChoiceField(choices=BaseProperty.CAR_SPACE, widget=forms.CheckboxSelectMultiple(), required=False)
    max_land_size  = forms.ChoiceField(choices=LAND_SIZE, widget=forms.Select, required=False, initial=0)
    min_land_size  = forms.ChoiceField(choices=LAND_SIZE, widget=forms.Select, required=False, initial=0)
    max_sale_price = forms.ChoiceField(choices=PRICE_LEVEL, widget=forms.Select, required=False, initial=0)
    min_sale_price = forms.ChoiceField(choices=PRICE_LEVEL, widget=forms.Select, required=False, initial=0)
#    sale_date_from = forms.DateField(widget=SelectDateWidget, required=False)
#    sale_date_to   = forms.DateField(widget=SelectDateWidget, required=False)


    

    